package com.dataart.training.crimequalification.service;

import com.dataart.training.crimequalification.dao.CrimeConsequenceDAO;
import com.dataart.training.crimequalification.entity.CrimeConsequenceEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CrimeConsequenceServiceImpl implements CrimeConsequenceService {

    //--------------------------------------------------------------

    @Autowired
    private CrimeConsequenceDAO crimeConsequenceDAO;

    //--------------------------------------------------------------

    /**
     *
     * @return
     */
    @Override
    public List<CrimeConsequenceEntity> getAllCrimeConsequences() {
        return crimeConsequenceDAO.getAllCrimeConsequences();
    }

    /**
     *
     * @param codename
     * @return
     */
    @Override
    public CrimeConsequenceEntity getCrimeConsequenceByCodeName(String codename) {
        return crimeConsequenceDAO.getCrimeConsequenceByCodeName(codename);
    }
}
